package com.sykj.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sykj.bean.DianZhan;
import com.sykj.service.DianZhanService;
import com.sykj.service.ProjectdianService;
import com.sykj.util.reponse.ResultBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: BeautyClub
 * @description:
 * @author: qiaoli
 * @create: 2020-08-13 22:17
 */
@RestController
@RequestMapping("/dian")
public class ProjectDianController {
    @Autowired
    ProjectdianService projectdianService;
@Autowired
    DianZhanService dianZhanService;
    @RequestMapping("/sava/{projectId}")
    public ResultBody   savadian(@PathVariable("projectId")String projectId){
        QueryWrapper queryWrapper=new QueryWrapper();
        queryWrapper.eq("project",projectId);
        DianZhan one = dianZhanService.getOne(queryWrapper);
        if(one==null){

        }
        return  projectdianService.savashuByRedis(projectId);
    }


}
